package com.kun.service;

import java.util.List;
import java.util.Map;


import com.kun.entity.Book;

/**
 * @description:
 * @author: KM
 * 2018年3月27日
 */
public interface BookService {
	
	public Book selectBookById(int bookid);
	
	/**
	 * 分页条件查询
	 * */
	public Map<String,Object> selectAllBook(int begin,int length,String jsonString,boolean isShow);
	
	public int insertReturnPrimaryKey(Book book);
	
	public int updateBook(Book book);
	
	public int deleteBook(int bookId);
	
	public List<Integer> selectBookLikeBookName(String bookname,String typeid);
	
	/**
	 * 根据booknumber增减库存
	 * */
	public int updateAmountByBookNumber(String bookNumber,int amount,boolean isAddBorrow);
	
	public Book selectBookByBooknumber(String bookNumber);
	
	/**
	 * 添加图书共享者
	 * */
	public int updateAddBookOwnerByBooknumber(String bookNumber,String ownerName);
	
	/**
	 * 删除图书共享者
	 * */
	public int updateDeleteBookOwnerByBooknumber(String bookNumber,String ownerName);

}
